package br.jcrsistemas.testes;

import java.awt.BorderLayout;
import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.SwingUtilities;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;
import javax.swing.border.EmptyBorder;
import net.miginfocom.swing.MigLayout;
import br.jcrsistemas.componentes.SysTabbedPane;
import javax.swing.JScrollPane;
import javax.swing.JLabel;
import br.jcrsistemas.componentes.SysTextField;

public class TesteMIG extends JFrame {

	private JPanel contentPane;
	private final SysTabbedPane sysTabbedPane = new SysTabbedPane();
	private final JPanel panel = new JPanel();
	private final JLabel lblTeste = new JLabel("Nome:");
	private final SysTextField sysTextField = new SysTextField();

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					TesteMIG frame = new TesteMIG();
//					try {
//						UIManager.setLookAndFeel("com.jgoodies.looks.plastic.PlasticXPLookAndFeel");
//						SwingUtilities.updateComponentTreeUI(frame);
//					} catch (ClassNotFoundException e) {
//						// TODO Auto-generated catch block
//						e.printStackTrace();
//					} catch (InstantiationException e) {
//						// TODO Auto-generated catch block
//						e.printStackTrace();
//					} catch (IllegalAccessException e) {
//						// TODO Auto-generated catch block
//						e.printStackTrace();
//					} catch (UnsupportedLookAndFeelException e) {
//						// TODO Auto-generated catch block
//						e.printStackTrace();
//					}
					UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
					SwingUtilities.updateComponentTreeUI(frame);
					frame.setVisible(true);
					
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the frame.
	 */
	public TesteMIG() {

		initialize();
	}
	private void initialize() {
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(100, 100, 1100, 720);
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		setContentPane(contentPane);
		contentPane.setLayout(new MigLayout("", "[grow]", "[grow]"));
		
		contentPane.add(sysTabbedPane, "cell 0 0,grow");
		
		sysTabbedPane.addTab("Principal", null, panel, null);
		panel.setLayout(new MigLayout("", "[149.00px][grow]", "[18.00px]"));
		
		panel.add(lblTeste, "cell 0 0,alignx left,aligny top");
		
		panel.add(sysTextField, "cell 1 0,growx");
	}

}
